<?php
$path = base_path() . drupal_get_path('theme', 'nobel') . '/';
$miniSite = nobel_get_minisite(arg(1));
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title><?= $miniSite['title'] ?></title>
  <link rel="shortcut icon" href="<?= $path ?>images/favicon.ico" type="image/x-icon">
  <link rel="stylesheet" href="<?= $path ?>css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="<?= $path ?>css/font-awesome.min.css" type="text/css">
  <link rel="stylesheet" href="<?= $path ?>css/animate.min.css" type="text/css">
  <link rel="stylesheet" href="<?= $path ?>css/video-js.css" type="text/css"/>
  <link rel="stylesheet" href="<?= $path ?>css/minisite.css" type="text/css">
  <!--[if lt IE 9]>
  <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js"></script>
  <![endif]-->
</head>
<script>
  function click_log(nid, title, backurl, submitUrl) {
    $.post("click-log", {nid: nid, title: title}, function (result) {
      if (result.status == 1) {
        if(submitUrl != '' && submitUrl != null && submitUrl != undefined){
          window.location.href = submitUrl;
        }else {
          alert(result.message);
        }
      } else {
        window.location.href = '/user/login?destination=' + backurl;
      }
    });
  }
</script>
<body>
<div class="parbase header">
  <section id="site1" class="header parallax page" style="background-image: url(<?= $miniSite['site1']['background'] ?>);">
    <div class="section-overlay">
      <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container">
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">
              <img src="<?= $path ?>images/logo-white-minisite.png" alt="Nobel Biocare logo">
            </a>
          </div>
          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="navbar-collapse collapse" id="bs-example-navbar-collapse-1" style="height: 1px;">
            <ul class="nav navbar-nav navbar-right">
              <!-- NAV -->
              <?php foreach ($miniSite['menu'] as $k => $value) { ?>
                <li <?= $k == 0 ? "class='active'" : '' ?>><a href="<?= $value['url'] ?>"><?= $value['title'] ?></a></li>
              <?php } ?>
            </ul>
          </div>
          <!-- /.navbar-collapse -->
        </div>
        <!-- /.container- -->
      </nav>
      <div class="container home-container">
        <div class="row">
          <div class="col-md-12">
            <div class="logo text-center"></div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-8 col-sm-8">
            <div class="home_text">
              <h1><?= $miniSite['site1']['title'] ?></h1>
              <?= $miniSite['site1']['content'] ?>
              <div class="download-btn">
                <!-- BUTTON -->
                <a class="btn tuor wow  animated" href="<?= $miniSite['site1']['submit_url'] ?>"
                   style="visibility: visible;"><?= $miniSite['site1']['submit_title'] ?> <i class="fa fa-angle-down"></i></a>
              </div>
            </div>
          </div>
          <div class="col-md-3 col-md-offset-1 col-sm-4"></div>
        </div>
      </div>
    </div>
  </section>
</div>
<div class="par parsys">
  <div class="section">
    <section class="light-grey" id="site2">
      <div class="container-component">
        <div class="container">
          <div class="row">
            <div class="col-md-10 col-md-offset-1">
              <div class="parsys par1">
                <div class="text parbase">
                  <div class="section_title">
                    <h2 style="text-align: center;"><?= $miniSite['site2']['title'] ?></h2>
                    <?= $miniSite['site2']['content'] ?>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="container-component">
        <div class="container">
          <div class="row">
            <div class="col-md-6">
              <div class="parsys par1">
                <div class="image-component">
                  <img src="<?= $miniSite['site2']['image'] ?>"/>
                </div>
              </div>
            </div>
            <div class="col-md-6">
              <div class="parsys par2">
                <div class="features-component">
                  <div class="inner_about_title">
                    <h3><?= $miniSite['site2']['subtitle'] ?></h3>
                  </div>
                  <div class="inner_about_desc">
                    <?php if (!empty($miniSite['site2']['list'])) {
                      foreach ($miniSite['site2']['list'] as $value) {
                        ?>
                        <div class="single_about_area fadeInUp wow" data-wow-duration=".5s" data-wow-delay="1s"
                             style="visibility: visible; animation-duration: 0.5s; animation-delay: 1s; animation-name: fadeInUp;">
                          <!-- ICON -->
                          <div><i class="fa fa-check-circle-o"></i></div>
                          <!-- HEADING DESCRIPTION -->
                          <h4><?= $value['title'] ?></h4>
                          <?= $value['content'] ?>
                        </div>
                      <?php }
                    } ?>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <div class="section">
    <section id="site3" class="parallax" style="background-image: url(<?= $miniSite['site3']['background'] ?>);">
      <div class="section-overlay section-spacing-big white-text">
        <div class="par parsys">
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-8">
                  <div class="parsys par1">
                    <div class="text parbase">
                      <h2><?= $miniSite['site3']['title'] ?></h2>
                      <?= $miniSite['site3']['content'] ?>
                    </div>
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="parsys par2">
                    <div class="cta-component">
                      <p align="center"><a class="btn btn-primary btn-action"
                                           onclick="click_log(<?= arg(1) ?>,'<?= $miniSite['site3']['submit_title'] ?>','<?= request_path() ?>','<?= $miniSite['site3']['submit_url'] ?>')"
                                           role="button"><?= $miniSite['site3']['submit_title'] ?></a></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <div class="section">
    <section class="light-grey" id="site4">
      <div class="section-spacing-bottom">
        <div class="par parsys">
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-10 col-md-offset-1">
                  <div class="parsys par1">
                    <div class="text parbase">
                      <div class="section_title">
                        <h2><?= $miniSite['site4']['title'] ?></h2>
                        <?= $miniSite['site4']['content'] ?>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="container-component">
            <div class="container">
              <div class="row">
                <?php if (!empty($miniSite['site4']['list'])) {
                  foreach ($miniSite['site4']['list'] as $value) {
                    ?>
                    <div class="col-md-6">
                      <div class="parsys par1">
                        <div class="text parbase">
                          <h2 class="text-center"><?= $value['title'] ?></h2>
                          <?= $value['content'] ?>
                        </div>
                        <div class="video-component">
                          <div class="video">
                            <video id="video_1" class="video-js vjs-default-skin vjs-big-play-centered gu-media--video" controls preload="auto"
                                   poster="" data-setup="{}">
                              <source src="<?= $value['video'] ?>" type='video/mp4'/>
                              <p class="vjs-no-js">
                                To view this video please enable JavaScript, and consider upgrading to a web browser that
                                <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
                              </p>
                            </video>
                          </div>
                        </div>
                      </div>
                    </div>
                  <?php }
                } ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <div class="section">
    <section id="site5" class="parallax" style="background-image: url(<?= $miniSite['site5']['background'] ?>);">
      <div class="section-overlay section-spacing-big white-text">
        <div class="par parsys">
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-12">
                  <div class="parsys par1">
                    <div class="carousel-component">
                      <div id="carousel_1932274134" class="carousel slide testimonial" data-ride="carousel">
                        <!-- Indicators -->
                        <ol class="carousel-indicators">
                          <?php foreach ($miniSite['site5']['list'] as $k => $value) { ?>
                            <li data-target="#carousel_1932274134" data-slide-to="<?= $k ?>" <?= $k == 0 ? "class='active'" : '' ?>></li>
                          <?php } ?>
                        </ol>

                        <!-- Wrapper for slides -->
                        <div class="carousel-inner">
                          <?php foreach ($miniSite['site5']['list'] as $k => $value) { ?>
                            <div class="item <?= $k == 0 ? 'active' : '' ?>">
                              <div class="text-center">
                                <!-- IMAGE -->
                                <img src="<?= $value['image'] ?>" alt="">
                                <div class="testimonial_caption">
                                  <!-- DESCRIPTION -->
                                  <h2><?= $value['title'] ?></h2>
                                  <h4><span></span></h4>
                                  <?= $value['content'] ?>

                                </div>
                              </div>
                            </div>
                          <?php } ?>
                        </div>
                      </div>

                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <div class="section">
    <section id="site6" class="light-grey">
      <div class="section-spacing-bottom ">
        <div class="par parsys">
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-10 col-md-offset-1">
                  <div class="parsys par1">
                    <div class="text parbase">
                      <div class="section_title">
                        <h2 class="text-center"><?= $miniSite['site6']['title'] ?></h2>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="container-component">
            <div class="container">
              <div class="row">
                <?php if (!empty($miniSite['site6']['list'])) {
                  foreach ($miniSite['site6']['list'] as $value) {
                    ?>
                    <div class="col-md-6">
                      <div class="parsys par1">
                        <div class="text parbase">
                          <h2 class="text-center"><?= $value['title'] ?></h2>
                          <?= $value['content'] ?>
                        </div>
                        <div class="video-component">
                          <div class="video">
                            <video id="video_1" class="video-js vjs-default-skin vjs-big-play-centered gu-media--video" controls preload="auto"
                                   poster="" data-setup="{}">
                              <source src="<?= $value['video'] ?>" type='video/mp4'/>
                              <p class="vjs-no-js">
                                To view this video please enable JavaScript, and consider upgrading to a web browser that
                                <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
                              </p>
                            </video>
                          </div>
                        </div>
                      </div>
                    </div>
                  <?php }
                } ?>
              </div>
            </div>
          </div>
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-10 col-md-offset-1">
                  <div class="parsys par1">
                    <div class="text parbase">
                      <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
                    </div>
                    <div class="cta-component">
                      <p align="center"><a class="btn btn-primary btn-video"
                                           onclick="click_log(<?= arg(1) ?>,'<?= $miniSite['site6']['submit_title'] ?>','<?= request_path() ?>','<?= $miniSite['site6']['submit_url'] ?>')"
                                           role="button"><?= $miniSite['site6']['submit_title'] ?></a></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <div class="section">
    <section id="site7" class="parallax" style="background-image: url(<?= $miniSite['site7']['background'] ?>);">
      <div class="section-overlay section-spacing-big white-text">
        <div class="par parsys">
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-8">
                  <div class="parsys par1">
                    <div class="text parbase">
                      <h2><?= $miniSite['site7']['title'] ?></h2>
                      <?= $miniSite['site7']['content'] ?>
                    </div>
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="parsys par2">
                    <div class="cta-component">
                      <p align="center"><a class="btn btn-primary btn-action"
                                           onclick="click_log(<?= arg(1) ?>,'<?= $miniSite['site7']['submit_title'] ?>','<?= request_path() ?>','<?= $miniSite['site7']['submit_url'] ?>')"
                                           role="button"><?= $miniSite['site7']['submit_title'] ?></a></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <div class="section">
    <section id="site8" class="light-grey">
      <div class="section-spacing-bottom">
        <div class="par parsys">
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-10 col-md-offset-1">
                  <div class="parsys par1">
                    <div class="text parbase">
                      <div class="section_title">
                        <h2><?= $miniSite['site8']['title'] ?></h2>
                        <?= $miniSite['site8']['content'] ?>
                      </div>
                    </div>
                    <div class="image-component">
                      <img class="wow bounceIn img-responsive center-block" data-wow-duration="1s" src="<?= $miniSite['site8']['image'] ?>" alt=""
                           style="visibility: visible; animation-duration: 1s; animation-name: bounceIn;">
                    </div>
                    <div class="cta-component">
                      <p align="center"><a class="btn btn-primary btn-video"
                                           onclick="click_log(<?= arg(1) ?>,'<?= $miniSite['site8']['submit_title'] ?>','<?= request_path() ?>','<?= $miniSite['site8']['file'] ?>')"
                                           role="button"><?= $miniSite['site8']['submit_title'] ?></a></p>
                    </div>
                    <div class="wistiaVideo">
                      <div class="cq-title-placeholder" style="width: 100%"></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <div class="section">
    <section id="site9" class="parallax" style="background-image: url(<?= $miniSite['site9']['background'] ?>);">
      <div class="section-overlay section-spacing-big white-text">
        <div class="par parsys">
          <div class="container-component">
            <div class="container">
              <div class="row">
                <div class="col-md-8">
                  <div class="parsys par1">
                    <div class="text parbase">
                      <h2><?= $miniSite['site9']['title'] ?></h2>
                      <?= $miniSite['site9']['content'] ?>
                    </div>
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="parsys par2">
                    <div class="cta-component">
                      <p align="center"><a class="btn btn-primary btn-action"
                                           onclick="click_log(<?= arg(1) ?>,'<?= $miniSite['site9']['submit_title'] ?>','<?= request_path() ?>','<?= $miniSite['site9']['submit_url'] ?>')"
                                           role="button"><?= $miniSite['site9']['submit_title'] ?></a></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
</div>
<section class="copyright">
  <div class="container">
    <div class="row">
      <div class="col-md-6">
        <div class="copy_right_text">
          <!-- COPYRIGHT TEXT -->
          <p><?= $miniSite['footer']['title'] ?></p>
          <p>
            <?php foreach ($miniSite['footer']['list'] as $value) { ?>
              <a href="<?= !empty($value['url']) ? $value['url'] : '' ?>" target="_blank"><?= $value['title'] ?></a>&nbsp;/&nbsp;
            <?php } ?>
          </p>
        </div>
        <div class="weixin">
          <img src="<?= $miniSite['footer']['image'] ?>">
        </div>
      </div>
      <div class="col-md-6">
        <div class="scroll_top">
          <a href="#site1"><i class="fa fa-angle-up"></i></a>
        </div>
      </div>
    </div>
  </div>
</section>
<script type="text/javascript" src="<?= $path ?>js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="<?= $path ?>js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?= $path ?>js/video.js"></script>
<script type="text/javascript" src="<?= $path ?>js/minisite.js"></script>
</body>
</html>